home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglmaterial.z / fglmaterial
Text File  |  1998-10-20  |  14KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallllffff,,,, ffffggggllllMMMMaaaatttteeeerrrriiiiaaaalllliiii,,,, ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallllffffvvvv,,,, ffffggggllllMMMMaaaatttteeeerrrriiiiaaaalllliiiivvvv - specify
  10.      material parameters for the lighting model
  11.  
  12.  
  13. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  14.      SUBROUTINE ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallllffff( INTEGER*4 _f_a_c_e,
  15.                               INTEGER*4 _p_n_a_m_e,
  16.                               REAL*4 _p_a_r_a_m )
  17.      SUBROUTINE ffffggggllllMMMMaaaatttteeeerrrriiiiaaaalllliiii( INTEGER*4 _f_a_c_e,
  18.                               INTEGER*4 _p_n_a_m_e,
  19.                               INTEGER*4 _p_a_r_a_m )
  20.  
  21.  
  22. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  23.      _f_a_c_e    Specifies which face or faces are being updated.  Must be one of
  24.              GGGGLLLL____FFFFRRRROOOONNNNTTTT, GGGGLLLL____BBBBAAAACCCCKKKK, or GGGGLLLL____FFFFRRRROOOONNNNTTTT____AAAANNNNDDDD____BBBBAAAACCCCKKKK.
  25.  
  26.      _p_n_a_m_e   Specifies the single-valued material parameter of the face or
  27.              faces that is being updated.  Must be GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS.
  28.  
  29.      _p_a_r_a_m   Specifies the value that parameter GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS will be set to.
  30.  
  31. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  32.      SUBROUTINE ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallllffffvvvv( INTEGER*4 _f_a_c_e,
  33.                                INTEGER*4 _p_n_a_m_e,
  34.                                CHARACTER*8 _p_a_r_a_m_s )
  35.      SUBROUTINE ffffggggllllMMMMaaaatttteeeerrrriiiiaaaalllliiiivvvv( INTEGER*4 _f_a_c_e,
  36.                                INTEGER*4 _p_n_a_m_e,
  37.                                CHARACTER*8 _p_a_r_a_m_s )
  38.  
  39.  
  40. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  41.      _f_a_c_e Specifies which face or faces are being updated.  Must be one of
  42.           GGGGLLLL____FFFFRRRROOOONNNNTTTT, GGGGLLLL____BBBBAAAACCCCKKKK, or GGGGLLLL____FFFFRRRROOOONNNNTTTT____AAAANNNNDDDD____BBBBAAAACCCCKKKK.
  43.  
  44.      _p_n_a_m_e
  45.           Specifies the material parameter of the face or faces that is being
  46.           updated.  Must be one of GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT, GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE, GGGGLLLL____SSSSPPPPEEEECCCCUUUULLLLAAAARRRR,
  47.           GGGGLLLL____EEEEMMMMIIIISSSSSSSSIIIIOOOONNNN, GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS, GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT____AAAANNNNDDDD____DDDDIIIIFFFFFFFFUUUUSSSSEEEE,  or
  48.           GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXXEEEESSSS.
  49.  
  50.      _p_a_r_a_m_s
  51.           Specifies a pointer to the value or values that _p_n_a_m_e will be set
  52.           to.
  53.  
  54. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  55.      ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll assigns values to material parameters.  There are two matched
  56.      sets of material parameters.  One, the _f_r_o_n_t-_f_a_c_i_n_g set, is used to shade
  57.      points, lines, bitmaps, and all polygons (when two-sided lighting is
  58.      disabled), or just front-facing polygons (when two-sided lighting is
  59.      enabled).  The other set, _b_a_c_k-_f_a_c_i_n_g, is used to shade back-facing
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      polygons only when two-sided lighting is enabled.  Refer to the
  75.      ffffggggllllLLLLiiiigggghhhhttttMMMMooooddddeeeellll reference page for details concerning one- and two-sided
  76.      lighting calculations.
  77.  
  78.      ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll takes three arguments.  The first, _f_a_c_e, specifies whether
  79.      the GGGGLLLL____FFFFRRRROOOONNNNTTTT materials, the GGGGLLLL____BBBBAAAACCCCKKKK materials, or both GGGGLLLL____FFFFRRRROOOONNNNTTTT____AAAANNNNDDDD____BBBBAAAACCCCKKKK
  80.      materials will be modified.  The second, _p_n_a_m_e, specifies which of
  81.      several parameters in one or both sets will be modified.  The third,
  82.      _p_a_r_a_m_s, specifies what value or values will be assigned to the specified
  83.      parameter.
  84.  
  85.      Material parameters are used in the lighting equation that is optionally
  86.      applied to each vertex.  The equation is discussed in the ffffggggllllLLLLiiiigggghhhhttttMMMMooooddddeeeellll
  87.      reference page.  The parameters that can be specified using ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll,
  88.      and their interpretations by the lighting equation, are as follows:
  89.  
  90.      GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT          _p_a_r_a_m_s contains four integer or floating-point values
  91.                          that specify the ambient RGBA reflectance of the
  92.                          material.  Integer values are mapped linearly such
  93.                          that the most positive representable value maps to
  94.                          1.0, and the most negative representable value maps
  95.                          to -1.0.  Floating-point values are mapped directly.
  96.                          Neither integer nor floating-point values are
  97.                          clamped.  The initial ambient reflectance for both
  98.                          front- and back-facing materials is (0.2, 0.2, 0.2,
  99.                          1.0).
  100.  
  101.      GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE          _p_a_r_a_m_s contains four integer or floating-point values
  102.                          that specify the diffuse RGBA reflectance of the
  103.                          material.  Integer values are mapped linearly such
  104.                          that the most positive representable value maps to
  105.                          1.0, and the most negative representable value maps
  106.                          to -1.0.  Floating-point values are mapped directly.
  107.                          Neither integer nor floating-point values are
  108.                          clamped.  The initial diffuse reflectance for both
  109.                          front- and back-facing materials is (0.8, 0.8, 0.8,
  110.                          1.0).
  111.  
  112.      GGGGLLLL____SSSSPPPPEEEECCCCUUUULLLLAAAARRRR         _p_a_r_a_m_s contains four integer or floating-point values
  113.                          that specify the specular RGBA reflectance of the
  114.                          material.  Integer values are mapped linearly such
  115.                          that the most positive representable value maps to
  116.                          1.0, and the most negative representable value maps
  117.                          to -1.0.  Floating-point values are mapped directly.
  118.                          Neither integer nor floating-point values are
  119.                          clamped.  The initial specular reflectance for both
  120.                          front- and back-facing materials is (0, 0, 0, 1).
  121.  
  122.      GGGGLLLL____EEEEMMMMIIIISSSSSSSSIIIIOOOONNNN         _p_a_r_a_m_s contains four integer or floating-point values
  123.                          that specify the RGBA emitted light intensity of the
  124.                          material.  Integer values are mapped linearly such
  125.                          that the most positive representable value maps to
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll((((3333GGGG))))
  137.  
  138.  
  139.  
  140.                          1.0, and the most negative representable value maps
  141.                          to -1.0.  Floating-point values are mapped directly.
  142.                          Neither integer nor floating-point values are
  143.                          clamped.  The initial emission intensity for both
  144.                          front- and back-facing materials is (0, 0, 0, 1).
  145.  
  146.      GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS        _p_a_r_a_m_s is a single integer or floating-point value
  147.                          that specifies the RGBA specular exponent of the
  148.                          material.  Integer and floating-point values are
  149.                          mapped directly.  Only values in the range [0,128]
  150.                          are accepted.  The initial specular exponent for both
  151.                          front- and back-facing materials is 0.
  152.  
  153.      GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT____AAAANNNNDDDD____DDDDIIIIFFFFFFFFUUUUSSSSEEEE
  154.                          Equivalent to calling ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll twice with the same
  155.                          parameter values, once with GGGGLLLL____AAAAMMMMBBBBIIIIEEEENNNNTTTT and once with
  156.                          GGGGLLLL____DDDDIIIIFFFFFFFFUUUUSSSSEEEE.
  157.  
  158.      GGGGLLLL____CCCCOOOOLLLLOOOORRRR____IIIINNNNDDDDEEEEXXXXEEEESSSS    _p_a_r_a_m_s contains three integer or floating-point
  159.                          values specifying the color indices for ambient,
  160.                          diffuse, and specular lighting.  These three values,
  161.                          and GGGGLLLL____SSSSHHHHIIIINNNNIIIINNNNEEEESSSSSSSS, are the only material values used
  162.                          by the color index mode lighting equation.  Refer to
  163.                          the ffffggggllllLLLLiiiigggghhhhttttMMMMooooddddeeeellll reference page for a discussion of
  164.                          color index lighting.
  165.  
  166. NNNNOOOOTTTTEEEESSSS
  167.      The material parameters can be updated at any time.  In particular,
  168.      ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll can be called between a call to ffffggggllllBBBBeeeeggggiiiinnnn and the
  169.      corresponding call to ffffggggllllEEEEnnnndddd.  If only a single material parameter is to
  170.      be changed per vertex, however, ffffggggllllCCCCoooolllloooorrrrMMMMaaaatttteeeerrrriiiiaaaallll is preferred over
  171.      ffffggggllllMMMMaaaatttteeeerrrriiiiaaaallll (see ffffggggllllCCCCoooolllloooorrrrMMMMaaaatttteeeerrrriiiiaaaallll).
  172.  
  173. EEEERRRRRRRROOOORRRRSSSS
  174.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if either _f_a_c_e or _p_n_a_m_e is not an accepted
  175.      value.
  176.  
  177.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if a specular exponent outside the range
  178.      [0,128] is specified.
  179.  
  180. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  181.      ffffggggllllGGGGeeeettttMMMMaaaatttteeeerrrriiiiaaaallll
  182.  
  183.  
  184. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  185.      ffffggggllllCCCCoooolllloooorrrrMMMMaaaatttteeeerrrriiiiaaaallll, ffffggggllllLLLLiiiigggghhhhtttt, ffffggggllllLLLLiiiigggghhhhttttMMMMooooddddeeeellll
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.